<!--净借记限额圈存资金调整录入页面-->
<template>
  <div class="app-container">
    <ht-table
      ref="dataTable"
      :showSerialNumber="false"
      :multi-select="false"
      :dictMap="dictMap"
      :reqConfig="reqConfig"
      :queryParams="queryParams"
      :tableBindColumns="tableBindColumns"
      :opButtonList="opButtonList"
    >
      <template v-slot:operate>
        <el-table-column
          label="操作"
          align="center"
          width="120"
          fixed="right"
          class-name="small-padding fixed-width"
        >
          <template slot-scope="scope">
            <ht-button-group
              :buttonList="[
            {
            label: '设置',
            // permission: 'user:xxx:xxx',
            doFunc: () => {
            handleAction('setting', scope.row);
            }
            }
            ]"
            />
          </template>
        </el-table-column>
      </template>
    </ht-table>
    <!-- 设置操作弹出框 -->
    <funds-setting
      ref="fundsSettingDialog"
      :dictMap="dictMap"
      :formData.sync="formData"
      @editComplete="editComplete"
    ></funds-setting>
  </div>
</template>
<script>
import { apiUrlConfig } from "@/api/cnaps/nets/AcctLimtWarn/net_circle_funds.js";
import FundsSetting from "./components/fundsSetting";
import { listPageMixin } from "@/libs/listPageMixin";
import { log } from "util";

export default {
  name: "netCircleFunds",
  mixins: [listPageMixin],
  components: {
    FundsSetting,
  },
  data() {
    return {
      reqConfig: apiUrlConfig,
      total: 0,
      dataList: [],
      //数据字典
      searchFormDictList: ["OPERATIONTYPECODE_OP"],
      //  明细弹框数据
      // form表单字段
      formData: {
        rspId: "",
        drctBankCode: "",
        drctBankName: "",
        adjType: "AD00",
        curd: "CNY",
        adjAmt: "",
      },
      // 查询参数
      queryParams: {},
      opButtonList: () => {
        return [];
      },
      tableBindColumns: [
        {
          label: `参与发起机构号`,
          prop: "drctBankCode",
          align: "center",
          sortable: false,
        },
        {
          label: `发起参与机构行名`,
          prop: "drctBankName",
          sortable: false,
        },
      ],
    };
  },
  mounted() {},
  methods: {
    editComplete(state) {
      if (state == true) {
        this.$refs.dataTable.doQuery();
      }
    },
    handleAction(type, row = {}) {
      switch (type) {
        case "setting":
          // 设置
          this.formData = { ...this.formData, ...row };
          //   this.$set(this.formData, "adjType", "AD00");
          //   this.$set(this.formData, "curd", "CNY");
          this.$refs.fundsSettingDialog.show();
          break;
      }
    },
  },
};
</script>
<style>
.label-header-msg {
  font-weight: bold;
}
</style>
